
var vm = new Vue({
	el: "#app",
	data:{
		city:'上海',
		cityList:[
			'上海','深圳','北京'
		],
		weatherList: []
	},
	methods:{
		getWeather: function () {
			var that = this;
			axios.get(`http://wthrcdn.etouch.cn/weather_mini?city=`+this.city)
				.then(response => {
				that.weatherList = response.data.data.forecast;
			},function (error) {
				console.log(error);
			})
		},
		btnSearch: function (p1) {
			this.city = p1;
			this.getWeather();
		}
	}
})